package com.hoperun.checkcloth.net

data class ApiResult<T>(val state: ApiState, val data: T?) {
    val errMessage
        get() = if (state is ApiError) state.message else ""
}

sealed class ApiState
class ApiError(val message: String) : ApiState()
object ApiOk : ApiState()